using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : Global
{    

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //string ean13 = "770256000440";
            //string epc = "";
            //string codigoRFID = "";
            //string prefijo = "7702090";            

            //EPC objEPC = new EPC();            
            //string tag = "0x3045D60A60015680000001F22A37";
            //string tag = "0x3035ACCF02AFE5C0000000151939";
            //string tag = "0x3035D60A6001588000000001C675";            
            //codigoRFID = objEPC.Encode("770209000669", EPC.EPCEncoding.SGTIN96, prefijo.Length, 1, 1);

            //ean13 = objEPC.GetEAN13(tag);
            //epc = objEPC.GetEPC(tag, ean13);
            //oGDataBlocks.InsertaLectura(sb.ToString(), parametros.proceso, parametros.id, 2);


            //int bytesRecibidos;
            //Byte[] mensajeRecepcion = new Byte[1024];
            //string resultado = "";
            //System.Net.IPAddress ip;
            //ip = System.Net.IPAddress.Parse("10.0.0.101");
            //System.Net.Sockets.Socket socket = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp);
            //System.Net.IPEndPoint ep;
            //ep = new System.Net.IPEndPoint(ip, System.Convert.ToInt32("8080"));
            //socket.Connect(ep);
            //Byte[] mensajeEnvio = System.Text.Encoding.ASCII.GetBytes("SELECT read_count, antenna_id, id FROM tag_id WHERE protocol_id='GEN2' set time_out=300;");
            //socket.Send(mensajeEnvio);
            //bytesRecibidos = socket.Receive(mensajeRecepcion);
            //socket.Close();
            //resultado = System.Text.Encoding.ASCII.GetString(mensajeRecepcion);
            //this.Label1.Text = resultado;

            
            //objR.start(1, 54, 2);
            //objR.test(53);
            //System.Threading.Thread.Sleep(300);
            //objR.test(54);
        }
    }

    //protected void Button1_Click(object sender, EventArgs e)
    //{
    //    objR.stop();
    //}
}
